<table width="100%" cellspacing="0" cellpadding="0" class="edit_block">
	<tr>
		<th width="1%" class="first">#</th>
		<th>Группа</th>
		<th>Владелец группы</th>
		<th width="1%">&nbsp;</th>
		<th width="1%" class="last">&nbsp;</th>
	</tr>
<?
$groups = $this->user->GetAvailableGroups();
while (list (, $id) = each($groups)) 
{

	$group = $this->mapper->GetById($id);
	if (!$group) continue;
?>
	  <tr>
		<td class="first"><?=$v['id'];?></td>
		<td class="title"><a
			href="<?=MozgRoute::Get('http')->Create(array('module' => 'admin', 'ctrl' => 'groups', 'action' => 'view_group', 'id' => $id));?>"><?=$group->GetTitle();?></a></td>
		<td><?=$this->mapper->GetById($group->GetParentId())->GetTitle();?></td>
		<td><a
			href="<?=MozgRoute::Get('http')->Create(array('module' => 'admin', 'ctrl' => 'groups', 'action' => 'add_group', 'id' => $id));?>"><img
			src="<?=_ROOT_URL;?>files/images/admin/edit_edit.gif" alt="edit"
			title="" width="30" height="11"></a></td>
		<td class="last"><a
			href="<?=MozgRoute::Get('http')->Create(array('module' => 'admin', 'ctrl' => 'groups', 'action' => 'del_group', 'id' => $id));?>"
			title="Удалить группу?" class="del"><img
			src="<?=_ROOT_URL;?>files/images/admin/edit_close.gif" alt="close"
			title="" width="9" height="11"></a></td>
	</tr>
<?
}
?>
</table>
<div class="bt_area"><input type="button" class="bt" value="Добавить"
	onclick="window.location.href='<?=MozgRoute::Get('http')->Create(array('module' => 'admin', 'ctrl' => 'groups', 'action' => 'add_group'));?>';" />
</div>